<div id="dialog">
<div class="login-frame-top"></div>
<div class="login-frame-middle">
<div style="width:316px;border-bottom:1px solid;font-weight:bold;font-size:14px;">BanMar CMS</div>
<div id="flash-message">
	<?php if( $flash = Session::instance()->get('flash') ): ?>
	<?php echo $flash;Session::instance()->flash_del('flash'); ?>
	<?php endif; ?>
</div>
<div id="inner-form">
<?php echo form::open('/admin/remind')?>
<table>
<tr>
	<td colspan="3">Na podany e-mail zostanie wysłane nowe hasło.</td>
</tr>
<tr><td colspan="3" align="right"><a id="remind-open" href="<?php echo Url::base(false,true) ?>logowanie">Logowanie</a></td></tr>
<tr>
	<td><?php echo I18n::get('email') ?></td>
	<td><?php echo form::input('remail', null) ?></td>
	<td class="error"></td>
</tr>
<tr>
	<td></td>
	<td align="right"><input type="image" style="margin-right:10px;margin-top:10px;margin-bottom:10px;" src="media/css/img_admin/wyslij.png" /></td>
	<td></td>
</tr>
</table>
<?php echo form::close()?>
</div>
</div>
<div class="login-frame-bottom"></div>
</div>
<div id="footer">
<p> BanMar &copy; 2010 | <a href="http://banmar.pl">www.banmar.pl</a> | tel. 535-751-211</p>
</div>

<script type="text/javascript">
<!--
$(document).ready(function(){
	$('form').submit(function(){
		var email = $('input[name=remail]').val();
		if(checkEmail(email) == false){
			$('#flash-message').text('Wprowadź poprawny e-mail');
			return false;
		}else{
			$('.error').text('');
			$("#submit-sending").html('<div class="flash-ok"><img src="<?php echo Url::base(false,true) ?>media/img/loading_16.gif" border="0" /> Trwa wysyłanie...</div>');
		}
	})
})
function checkEmail(email) {
	var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
    if(email.search(emailRegEx) == -1) {
		return false;
    }
}
//-->
</script>